import * as THREE from 'three';
// import { GLTFLoader } from 'three/addons/loaders/GLTFLoader.js'
const model = new THREE.Group();
const A = new THREE.Vector3(30,30,0)
const B = new THREE.Vector3(130,80,0)
let AB = new THREE.Vector3()
// AB.subVectors(B,A)//AB的向量设置为B-A
// B.sub(A)//B-A后赋值给B
AB = B.clone().sub(A)//AB的向量为B-A
console.log(AB);//AB的向量为(100,50,0)
// 计算AB的长度
const ABL = AB.length()//length表示原点到AB坐标的长度
console.log("位移长度"+ABL);

// 也可以表示速度方向大小
const v = new THREE.Vector3(1,1,0)
// 速度大小
const vL = v.length()
console.log("速度大小"+vL);


export default {model};